$(function () {
    let id=localStorage.getItem("navigationId");
    findById(id);
})

function findById(id) {
    let data=myAjax("/back/navigation/navigationfindById",{id:id},"get");
    data=data.navigationModel;
    $("#navigationId").val(data.id);
    $("#navigationName").val(data.name);
    $("#connection").val(data.connection);
    $("input[name='isShow'][value="+data.isShow+"]").attr("checked",true);
}

function navigationUpdate() {
    let da={
        id:localStorage.getItem("navigationId"),
        name:$("#navigationName").val(),
        connection:$("#connection").val(),
        isShow:$("input[name='isShow']:checked").val(),
    }
    let data=myAjax("/back/navigation/navigationUpdate",da,"post");
    if (data.count==1){
        alert("修改成功");
        $('#reght').load('/back/navigation/navigationFandAll.html');
    } else {
        alert("修改失败");
    }
}